uniform sampler2D mainImage;

void main() {
	int i;
	vec4	sum = vec4(0.0);
	vec2	lut = vec2(0.0);

	for(i = 0; i < 9; i++) {
		lut.y = mod(float(i), 3.0);
		lut.x = float(i / 3);		
		
		vec4	lcl_clr = texture2D(mainImage, gl_TexCoord[0].st + lut.xy);
		sum += lcl_clr;
	}

	gl_FragColor = sum / 9.0;
}
